package com.sys.config;

import cn.willingxyz.restdoc.core.config.RestDocConfig;
import cn.willingxyz.restdoc.springswagger3.EnableSwagger3;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

/**
 * 官网文档
 * https://github.com/Willing-Xyz/RestDoc
 */
@Configuration
@EnableSwagger3
public class SwaggerConfig {
    @Bean
    RestDocConfig _swaggerConfig() {
        return RestDocConfig.builder()
                //配置文档标题
                .apiTitle("order")
                //配置文档描述
                .apiDescription("order desc")
                //配置文档版本
                .apiVersion("1.0")
                //配置扫描的包
                .packages(Arrays.asList("com.sys.controller", "com.order.controller"))
                .build();
    }
}